/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author hancing.com
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface DpVipinfo extends BasicModel<DpVipinfo> {
  title?: string; // 标题
  smallpic?: string; // 缩略图
  oldprice?: number; // 原价
  price?: number; // 现价
  vipcontent?: string; // vip权益说明
  vipdaylong?: number; // 时长
  viptimeunit?: string; // 时长单位
  sortno?: string; // 排序号
}

export const dpVipinfoList = (params?: DpVipinfo | any) =>
  defHttp.get<DpVipinfo>({ url: adminPath + '/dp/vipinfo/dpVipinfo/list', params });

export const dpVipinfoListData = (params?: DpVipinfo | any) =>
  defHttp.post<Page<DpVipinfo>>({ url: adminPath + '/dp/vipinfo/dpVipinfo/listData', params });

export const dpVipinfoForm = (params?: DpVipinfo | any) =>
  defHttp.get<DpVipinfo>({ url: adminPath + '/dp/vipinfo/dpVipinfo/form', params });

export const dpVipinfoSave = (params?: any, data?: DpVipinfo | any) =>
  defHttp.postJson<DpVipinfo>({ url: adminPath + '/dp/vipinfo/dpVipinfo/save', params, data });

export const dpVipinfoDelete = (params?: DpVipinfo | any) =>
  defHttp.get<DpVipinfo>({ url: adminPath + '/dp/vipinfo/dpVipinfo/delete', params });
